;(function ($, window, document, undefined) {
	//城市转换名字
	$("#areaAll").change(function(){
		var nameArea = $(this).find("option:selected").text();
		$("#areaAllName").text(nameArea);
	});
	//设置警告规则
	$(".setWarningRule").click(function(){
		var obj = $(this);
		var t= layer.confirm('<div class="margin20">设置警告规则设置警告规则设置警告规则</div>', {
		    btn: ['确定','取消'],
		    type:1,
		    title:"设置警告规则",
		},function(){
			layer.close(t);
		}, function(){
			layer.close(t);
		});
	});

        //车场发展分析
        var myChart9 = echarts.init(document.getElementById('main9')); 
        var myChart10 = echarts.init(document.getElementById('main10')); 
		option9 = {
		    tooltip : {
		        trigger: 'axis',
		        axisPointer : {            // 坐标轴指示器，坐标轴触发有效
		            type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
		        }
		    },
		    legend: {
		        data:['车场个数','签约个数']
		    },
		    xAxis : [
		        {
		            type : 'category',
		            boundaryGap : false,
		            data : ['201606','201607','201608','201609','201610','201611','201612']
		        }
		    ],
		    yAxis : [
		        {
		            type : 'value'
		        }
		    ],
		    series : [
		        {
		            name:'车场个数',
		            type:'line',
		            barWidth : 5,
		            data:[320, 332, 301, 334, 390, 330, 320]
		        },
		       	{
		            name:'签约个数',
		            type:'line',
		            data:[62, 101, 94, 106, 179, 100, 157],
		        },
		        
		    ]
		};


	
		option10 = {
		    tooltip : {
		        trigger: 'axis'
		    },
		    legend: {
		        data:['新增车场数', '总运营车场数']
		    },
		    calculable : true,
		    xAxis : [
		        {
		            type : 'value',
		            boundaryGap : [0, 0.01]
		        }
		    ],
		    yAxis : [
		        {
		            type : 'category',
		            data : ['成都','长沙','西安','重庆','深圳','广州','上海','北京']
		        }
		    ],
		    series : [
		        {
		            name:'新增车场数',
		            type:'bar',
		            data:[18203, 23489, 29034, 104970, 131744, 630230,32132,32132]
		        },
		        {
		            name:'总运营车场数',
		            type:'bar',
		            data:[19325, 23438, 31000, 121594, 134141, 681807,32132,32132]
		        }
		    ]
		};

        //车场发展分析
        myChart9.setOption(option9); 
        myChart10.setOption(option10);       

        

})(window.jQuery, window, document);
	
	


 